Similarity measures

ABSTRACT

A method of matching data sets, such as different images, by estimating a transformation which relates the two images. Different candidate transformations are scored by using a similarity measure calculated on the basis of probability density functions derived from the two data sets themselves. The probability density functions are based on local likelihood density estimation (LLDE). The technique is applicable to image registration, and also to data fusion.

BACKGROUND OF THE INVENTION

The present invention relates to similarity measures used for measuring the degree of match of data sets to each other.

There are many fields in which it is desirable to be able to measure the similarity or degree of match of one data set to another. For example, there are many situations in which two images are compared to determine a spatial transformation which relates the two images. For example, one method of compressing a time sequence of images is to detect movement vectors which describe where image features found in a first frame are positioned in a second frame. Alternatively, in the field of medical imaging, it is often desirable to display two images of the same object (for example, part of a patient's body) overlying one another. The two images could be images taken at different times or images taken with different modalities. The display of the two images overlying one another requires them to be registered and this involves finding the position of corresponding image features in each of the images. Similar techniques are useful in other fields involving so-called data fusion, for example in which a visible or infra-red image is registered with a different kind of image, such as synthetic aperture radar. The need may also arise with one-dimensional signals such as ECG and blood-oxygen level which could usefully be registered, and four-dimensional images such as contrast-enhanced MRI in which a 3-D image varies over time.

DISCUSSION OF THE PRIOR ART

In registering data sets in this way, typically a variety of candidate transformations are applied to the images and are scored on the basis of how accurately they register the two images. The score may be calculated automatically using a similarity measure and a large number of different similarity measures have been proposed, for example least square differences, cross-correlation etc, the different similarity measures being, in general, suited to different types of data sets.

Until now, similarity measures have tended to be selected either on a trial-and-error basis for the particular data sets to be matched, or have been derived from an understanding of the mechanisms underlying the generation of the data, for example the physical processes behind the generation of the images. However, it can be difficult to predict whether a given similarity measure will be suitable for a particular type of data, and the designing of new similarity measures is a time-consuming and difficult process.

SUMMARY OF THE INVENTION

In accordance with the present invention the designing of a similarity measure, which measures the likelihood that a given transformation is the correct one, takes place in a statistical framework based on the properties of the two data sets themselves, using the methodology of maximum likelihood inference.

In more detail, the present invention provides a method of finding a transformation which relates data points in a first data set to data points in a second data set, comprising calculating for each of a plurality of candidate transformations a likelihood measure representing the likelihood that the candidate transformation correctly represents the relationship between the two data sets, the likelihood measure being based on local parametric joint and marginal probability density functions (pdf) calculated for the pairs of data points in the two data sets which are regarded as corresponding under the candidate transformation, the parameters of the functions being set by maximising a local likelihood criterion for the pairs of data points.

Preferably the probability density functions are based on the characteristics of the data points local to the pairs of data points. Thus the parametric functions, which may differ from point to point, are assumed to hold for the neighbourhood of the data points, but may differ for points distant from each other.

Thus, with the present invention the probability density functions are calculated for the pairs of data points generated by the particular candidate transformation under consideration. The likelihood measure is therefore adapted to the two data sets being matched. There is no need for prior knowledge of the mechanism of production of the data sets.

The probability density functions may be simple parametric functions, such as second order polynomial functions. The parameters of the functions are set by maximising the local likelihood criterion for pairs of data points, this being based on the probability density function and preferably a window function and a scale parameter. The window function and scale parameter may be heuristically adjusted to tune the performance of the method. The parameters may be recalculated for each pair of data points, or at least for different parts of the image.

The method is applicable to the registration of images in which the data sets are, for example, the intensities of the pixels, and in this case the transformation is a spatial transformation which registers the two images. The images may, for example be different modality and/or time-spaced images and the method is particularly suitable to the registration of medical images.

However, the method is applicable to other data sets, such as those representing signals or measurements.

It will be appreciated that the invention may be embodied in computer software and thus may provide a computer program for executing the method on a suitably programmed computer system. Alternatively, of course, the invention may be embodied in firmware or dedicated hardware.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be further described by way of example with reference to the accompanying drawings in which:

FIG. 1 schematically illustrates two data sets which may be processed in accordance with the invention;

FIG. 2 is a flow diagram of one example of the invention;

FIGS. 3( a) and (b) show the joint and smoothed histogram of a CT-MR pair of images of the brain and FIGS. 3( c) and (d) corresponding estimated pdfs using the technique of the invention; and

FIGS. 4( a), (b) and (c) show respectively example slices of an MR and CT image and the result of fusing them using the technique of the invention.

DESCRIPTION OF A PREFERRED EMBODIMENT

An embodiment of the invention will be described with reference to two data sets which are images. Thus, as illustrated in FIG. 1, given two images I and J, and that J is a version of I transformed by transformation T which purports to relate their respective coordinate systems, the aim is to develop a similarity measure which accurately scores how close the transformation T is to the “correct” transformation. In other words, how likely is it that J is image I transformed by transformation T? The transformation T defines a set of spatial correspondences between the pixels from I and the pixels from J.

Assuming that I is the source image and J is the target image, this means that a pixel with coordinates x in the coordinate system in image I matches the pixel with coordinates T(x) in the coordinate system of image J. Let us denote by {x_(k)}, with k=1, . . . , n, the set of pixels of image I. The intensity value corresponding to x_(k) will be denoted i_(k). Similarly, the intensity value of its corresponding pixel in J, i.e. the pixel with coordinates T(x_(k)), will be denoted j_(k).

Note that, proceeding in this way from a given transformation T yields a set of intensity pairs, A(T)={(i_(k), j_(k)), k=1, . . . , n}. Note also that the set of intensity pairs would be expected to change as the putative transformation T changes, that is, the set of intensity pairs can be regarded mathematically as a function of T. The likelihood of T, i.e. the probability that T is the correct registration transformation, is given by the following formula:

$\begin{matrix} {{l(T)} = {\sum\limits_{k \in {A{(T)}}}^{\;}\;{\log\frac{p\left( {i_{k},j_{k}} \right)}{{p_{1}\left( i_{k} \right)}{p_{2}\left( j_{k} \right)}}}}} & (1) \end{matrix}$ where p is the joint intensity pdf, while p₁ and p₂ are the marginal pdfs corresponding respectively to I and J. However, equation (1) can be exploited in practice only if these three pdfs are specified.

The basic principle used in the present embodiment is to use Local Likelihood Density Estimation (LLDE) to estimate the pdf from a data set by assuming that the pdf locally can be approximated by a simple parametric form, even when, as is the case in general, there is no simple parametric form for the entire pdf. In this embodiment, it is further assumed that the logarithm of the pdf is locally a second-order polynomial, but it can be understood that any other parametric form could be used, e.g. a higher-order polynomial.

Thus, for any observed intensity pair (i,j), a set of coefficients (a₀, a₁, . . . , a₅) is calculated such that the polynomial approximation to the pdf holds in a neighbourhood of (i,j): log p(u,v)≈a ₀ +a ₁(u−i)+a ₂(v−j)+a ₃(u−i)(v−j)+a ₄(u−i)² +a ₅(v−j)²,  (2) for u and v sufficiently close to i and j, respectively. In one embodiment of the method, polynomial coefficients are set so as to maximise the local likelihood criterion:

$\begin{matrix} {{C\left( {a_{0},a_{1},\ldots\mspace{14mu},a_{5}} \right)} = {{\sum\limits_{k}^{\;}\;{{w\left( {\frac{i_{k} - i}{s_{1}},\frac{j_{k} - j}{s_{2}}} \right)}\log\;{p\left( {i_{k},j_{k}} \right)}}} - {n{\int{{w\left( {\frac{u - i}{s_{1}},\frac{v - j}{s_{2}}} \right)}{p\left( {u,v} \right)}{\mathbb{d}u}{\mathbb{d}v}}}}}} & (3) \end{matrix}$ where w(.,.) is a given window function and s₁ s₂ are scale parameters. Typical choices for w are: 1) the box car function, i.e. w(x,y)=1 if /x/<1 and /y/<1, and w(x,y)=0 otherwise, and 2) the Gaussian function, i.e. w(x,y)=exp(−x²−y²). While w determines the shape of the local weighting function, the scale parameters s₁ and s₂ adjust the extension of the neighbourhood defined by the window support, and therefore control the size of locality. Both s1 and s2 are parameters of the method, and the method of tuning those parameters is completely independent from the present invention. In an empirically based implementation, s1 and s2 may be set, depending on the specific image types being considered, to values that were evidenced to yield good registration results in previous experiments with similar images. For instance, an example rule that proved to be useful in practice is to set s1 to a given fraction of the maximum intensity in image I, the fraction being 1% for a CT image, 2% for an MR image, and 5% for a PET or SPECT image. The same rule may be applied to s2 depending on the type of image J.

From a theoretical standpoint, the bigger s1 and s2 the bigger the intensity neighbourhood used to fit the local polynomial model, and, therefore, the smoother the resulting pdf estimate. On the other hand, choosing small values for s1 and s2 yields more flexibility as it allows for more abrupt variations in the pdf estimate; however, the price to pay is that registration tends to be more sensitive to image artifacts and noise. This familiar trading off scale parameters is common in statistical estimation, where it is known as “bandwidth selection”.

The estimation of the marginal pdfs, p₁ and p₂, follows from the same principle. A local second-order polynomial form is assumed, i.e.: log p ₁(u)≈a ₀ +a ₁(u−i)+a ₂(u−i)²  (4) and similarly for p₂.

The local polynomial is fitted by maximising a one-dimensional version of Equation (3):

$\begin{matrix} {{C\left( {a_{0},a_{1},a_{3}} \right)} = {{\sum\limits_{k}^{\;}\;{{w_{1}\left( \frac{i_{k} - i}{s_{1}} \right)}\log\;{p_{1}\left( i_{k} \right)}}} - {n{\int{{w_{1}\left( \frac{u - i}{s_{1}} \right)}{p_{1}(u)}{\mathbb{d}u}}}}}} & (5) \end{matrix}$ and similarly for p₂. For consistency with the joint pdf estimation, the window functions w₁ and w₂ are defined from the bidimensional window function w as: w₁(u)=w(u,0) and w₂(v)=w(0, v).

The main advantage of LLDE lies in its ability to provide accurate density estimates while resorting to very few assumptions regarding the shape of the pdf. This is important because mispecification of the densities p, p₁ and p₂ involved in the similarity measure (1) may be reflected by substantial registration errors.

Unlike parametric approaches, a global model of the joint pdf, is not needed, the selection of which would require the tedious and difficult task of modelling the image acquisition processes. Moreover, parametric approaches typically lead to non-convex optimisation problems which make them difficult to implement in practice.

FIG. 2 is a flow diagram which indicates the steps in the order they can occur in an example algorithm. The two data sets are taken in step 200, for example the two images, and then in step 201 it is necessary to choose scale parameters s₁ and s₂ and the window function w as discussed above.

In step 202 the marginal pdfs for each of the data sets are calculated using Equations 4 and 5, that is to say calculating a₀ a₁ a₂ by fitting the local polynomial of Equation 4 by maximising Equation 5. (This step can be carried out at any time before the likelihood calculation for which it is needed.)

Then, in step 203, for a given candidate transformation T, the intensity pairs A(T) are found. Referring to FIG. 1, the transformation T illustrated there is a simple shift to the right by one pixel. Thus, under the transformation T, pixel j2 corresponds to pixel i1, pixel j3 corresponds to pixel i2 etc. Thus the set of intensity pairs A(T) is as illustrated below the two image frames.

Then in step 204 an intensity pair is taken and the polynomial coefficients a₁, a₂, a₃, a₄, a₅ are calculated in step 205 by maximising the local likelihood criterion of equation (3). (Note that the coefficients a₁, a₂, a₃, a₄, a₅ vary from pair to pair.)

Having obtained the polynomial coefficients the joint probability density function p can be calculated in step 206 using the equation (2).

In step 207 it is tested whether all intensity pairs have been treated and if not the process is repeated until all pairs have been done. Once all pairs have been done the likelihood measure for that transformation can be calculated in step 209 using equation (1).

Then in step 210 and 211, other candidate transformations are taken and the process is repeated.

Each candidate transformation will then have an associated likelihood and in step 212 it is possible to select the transformation with the highest likelihood. This represents the best estimate of how the second image frame relates to the first. As indicated in step 213, it is possible to repeat the process with different values of s₁, s₂ and w to improve the results.

FIG. 3( a) shows the joint histogram of a CT-MR pair of images of the brain after registration. Thus each point in the histogram represents the number of pixels in the registered image with a given CT intensity and a given MR intensity. Good registration results in a histogram with a clear structure and few peaks. Poor registration results in more, scattered, peaks. The raw histogram in FIG. 3( a) is noisy, especially in the CT bone—MR soft tissue area. Direct estimation of p(i,j) from just this raw histogram (i.e. p(i,j)=h(i,j)) would result in limited robustness in the estimation of the registration transformation because small changes in the transformation cause large changes in the histogram and thus the similarity score. FIG. 3( b) shows a smoothed version of the histogram, using a simple uniform blurring technique, or simple Parzen windowing. It can be seen that the CT soft tissue—MR soft tissue area is smoothed, thus usefully reducing the sensitivity of the similarity measure to the transformation. But the distribution is inevitably less sharp and so such simplistic smoothing of the joint histogram can lose important properties of the distribution and bias the estimation of a correct p(i,j). This would result in less accurate registration of the two images (an inevitable result of reducing the sensitivity of the similarity score to the transformation). FIGS. 3( c) and (d) show p(i,j) estimated according to the invention with different values of s₁ and s₂. As can be seen the noise is cancelled out, but the properties of the distribution, such as the sharpness of the high peaks, are conserved. The preservation of the sharp peaks allows for accurate registration, while the reduction of noise increases robustness.

FIGS. 4( a) and (b) show example slices of an MR and CT image respectively, and FIG. 4( c) shows the result of fusing them using the technique of the invention. It can be seen that the skull structure lines up well in both CT (bright oval shape) and MR (between the brain and the scalp) images. 

1. A method of finding a transformation which relates pixels in a first image to pixels in a second image, comprising: calculating for each of a plurality of candidate transformations a likelihood measure representing the likelihood that the candidate transformation correctly represents the relationship between the two images, the likelihood measure being based on local parametric joint and marginal probability density functions (pdf) calculated for the pairs of pixels in the two images which are regarded as corresponding under the candidate transformation, the parameters of the functions being set by maximizing a local likelihood criterion for the pairs of pixels, wherein the local parametric joint and marginal probability density functions are approximations in parametric form.
 2. A method according to claim 1 wherein the local likelihood criterion for each probability density function is calculated based on the probability density function and at least one of a window function of the of the local data point characteristics and a scale parameter.
 3. A method according to claim 2 wherein the window function and the scale parameter are heuristically adjusted.
 4. A method according to claim 1 wherein the probability density functions are polynomial functions.
 5. A method according to claim 4 wherein the probability density functions are second order polynomial functions.
 6. A method according to claim 1 wherein the images represent signals or measurements.
 7. A method according to claim 1 wherein the transformation is a spatial transformation that registers the images.
 8. A method according to claim 7 wherein the images represent different modality images.
 9. A method according to claim 7 wherein the images represent medical images.
 10. A method according to claim 1 wherein the images are time-separated.
 11. A computer program stored on a computer-readable medium comprising program code means for executing on a programmed computer system the method of claim
 1. 12. A method according to claim 1 wherein the image is a three-dimensional image or a four-dimensional image.
 13. A method according to claim 1 wherein the image is a four-dimensional image in which a three-dimensional image varies over time. 